﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<OptimumInfra.Models.TemplateCategory>" %>

<asp:Content ID="registerContent" ContentPlaceHolderID="AdminContent" runat="server">
    <h2>Edit Category</h2>
    <% if(TempData["info"] !=null) { %>
    <p style="text-align: center; color: Red;"><%=TempData["info"] %></p>
    <% } %>

    <% using (Html.BeginForm()) { %>
        <%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") %>
                <legend>Account Information</legend>
          <table width="700px" style="margin-top: 10px;">
          <tr>
          <td>          
                <div class="editor-label">
                    <%: Html.LabelFor(category => category.Name) %>
                </div>
            </td> 
            <td>
                <div class="editor-field">
                    <%: Html.TextBoxFor(category => category.Name)%>
                    <%: Html.ValidationMessageFor(category => category.Name)%>
                </div>
           </td> 
          </tr>
          <tr>       
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Description) %>
                </div>
            </td>
            <td>
                <div class="editor-field">
                    <%: Html.TextBoxFor(category => category.Description)%>
                    <%: Html.ValidationMessageFor(category => category.Description)%>
                </div>
            </td>
          </tr>          
                <p>
                    <input type="submit" value="Update" />
                </p>
            </table>
    <% } %>
</asp:Content>
